package br.com.exemplo.swing;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;

public class ExemploJTabbedPane {

	public static void main(String[] args) {
		JFrame janela = new JFrame("Titulo da Janela");
		
		JTabbedPane pane = new JTabbedPane();
		janela.add(pane);
		
		JPanel painel1 = new JPanel();
		pane.add("titulo 1", painel1);

		JLabel label = new JLabel("Texto 1");
		painel1.add(label);
		
		JPanel painel2 = new JPanel();
		pane.add("titulo 2", painel2);

		JLabel label2 = new JLabel("Texto 2");
		painel2.add(label2);
		
		janela.setSize(325, 100);
		janela.setVisible(true);
		janela.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

	}

}
